#include <cstdio>
#include <vector>
#include <string>
#include <cassert>

using namespace std;

const int MAX = 100000;
vector<int> v[MAX];
int n, m;

void Read()
{
	int i1, i2;
	char buf[128];
	while ( gets(buf)!=NULL )
	{
		if ( sscanf(buf, "%d %d", &i1, &i2) != 2 ) break;
		if ( i1==i2 ) continue;
		
		//i1--, i2--;
		v[i1].push_back(i2);
		v[i2].push_back(i1);
		n = max(n, i1+1);
		n = max(n, i2+1);
	}
}

void Write()
{
	printf("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n");
	printf("<grpahml >\n");
	printf("<graph directed='false' id='insert here!'>\n");

	for (int i=0;i<n;i++)
		printf("	<node id='%d' />\n", i);

	printf("\n");	
	for (int i=0;i<n;i++)
	{
		for (int j=0;j<(int)v[i].size();j++)
			printf("	<edge source='%d' target='%d'/>\n", i, v[i][j]);
	}
	
	printf("</graph>\n");
	printf("</grpahml>\n");
	
}

int main()
{
	Read();
	Write();
	return 0;
}
